﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using wjy自制小框架.Common.Mapper;
using wjy自制小框架.Common.Pojo;

namespace wjy自制小框架.Web.Demo
{
    /// <summary>
    /// 测试demo Service层
    /// </summary>
    class DemoService : BaseMapper<Demo>
    {
        /// <summary>
        /// 查询分页
        /// </summary>
        public AjaxResult selectPage(JObject param)
        {
            return selectPage(param.ToObject<PageParam>(), new QueryWrapper()
                .likeIfPresent("Name1", param.Value<string>("Name1"))
                .orderByDesc("ID"));
        }
    }

    /// <summary>
    /// 测试demo
    /// </summary>
    class Demo
    {
        public long ID { get; set; }
        public string Name1 { get; set; }
        public string Name2 { get; set; }
        public string Name3 { get; set; }
    }
}
